<div class="bf-houseinfo">
  <!--确认弹窗-->
  <p-confirmDialog acceptLabel="确认" rejectLabel="取消"></p-confirmDialog>
  <!--消息提示-->
  <p-messages  [closable]="true" [style]="{'position':'fixed','left':'10vw','top': '0','margin-top': '0','width': '120vw','z-index':'9999'}"></p-messages>
  <!--顶部按钮-->
  <div class="bf-houseinfo-header">
    <div class=" ui-g-4">
      <div class="ui-g-1 bf-houseinfo-header-btn bf-houseinfo-header-btn-add" (click)="houseinfoAddClick()">
        <img class="bf-houseinfo-header-img-add" src="assets/images/ic_add.png" alt="">
        <span>增 加</span>
      </div>
      <div class="ui-g-1 bf-houseinfo-header-btn bf-houseinfo-header-btn-modify" (click)="houseinfoModifyClick()">
        <img class="bf-houseinfo-header-img-modify" src="assets/images/ic_modify.png" alt="">
        <span>修 改</span>
      </div>
      <div class="ui-g-1 bf-houseinfo-header-btn bf-houseinfo-header-btn-delete" (click)="houseinfoDeleteClick()">
        <img class="bf-houseinfo-header-img-delete" src="assets/images/ic_delete.png" alt="">
        <span>删 除</span>
      </div>
    </div>
    <!--搜索-->
    <div class="ui-inputgroup bf-houseinfo-header-btn-search">
      <input type="text" pInputText placeholder="请输入地块号" #input>
      <button   type="button"  (click)="houseinfoSearchClick()"  label="搜索" style="outline: none;border:0;background: #5E6372;width: 6vw;color: #fff;margin-left: 1vw;border-radius: 5px">搜索</button>
      <!--<span class="ui-inputgroup-addon" (click)="exportSearchClick($event)"><i class="fa fa-search"></i></span>-->
    </div>
  </div>
  <!--表格-->
  <div class="bf-houseinfo-table">
    <p-scrollPanel [style]="{width:'100%',height: '90%'}" styleClass="custombar">
      <p-table [columns]="houseinfoTableTitle" [value]="houseinfoTableContent" selectionMode="multiple"  [(selection)]="houseinfoSelect" (onRowSelect)="houseinfoonRowSelect($event)">
        <ng-template pTemplate="header" let-columns>
          <tr >
            <th style="width: 3em"  [ngStyle]="this.houseinfoTableTitleStyle">
              <p-tableHeaderCheckbox></p-tableHeaderCheckbox>
            </th>
            <th *ngFor="let col of columns"  [ngStyle]="this.houseinfoTableTitleStyle">
              {{col.header}}
            </th>
          </tr>
        </ng-template>
        <ng-template pTemplate="body" let-rowData let-columns="columns" let-rowIndex="rowIndex">
          <tr [pSelectableRow]="rowData"  *ngIf="rowIndex%2!=1" [ngStyle]="{'background':'#33353C','color':'#DEDEDE','text-align': 'center','height':'2vw'}">
            <td>
              <p-tableCheckbox [value]="rowData"></p-tableCheckbox>
            </td>
            <td  *ngFor="let col of columns" >
              {{rowData[col.field]}}
            </td>
          </tr>
          <tr [pSelectableRow]="rowData"  *ngIf="rowIndex%2!=0" [ngStyle]="{'background':'#2E3037','color':'#DEDEDE','text-align': 'center','height':'2vw'}">
            <td>
              <p-tableCheckbox [value]="rowData"></p-tableCheckbox>
            </td>
            <td  *ngFor="let col of columns" >
              {{rowData[col.field]}}
            </td>
          </tr>
        </ng-template>
      </p-table>
    </p-scrollPanel>

  </div>
  <!--增加弹窗-->
  <p-dialog header="信息添加" [(visible)]="houseinfoAddDialog" [width]="800">
    <!--Content-->
    <div class="ui-g ui-fluid" [ngStyle]="{'line-height':'3vh'}">
      <div class="ui-g-6">
        <div class="ui-g-4">
          <label for="addroomCode">房间编号：</label>
        </div>
        <div class="ui-g-8">
          <input id="addroomCode" type="text" pInputText placeholder="请输入房间编号" [(ngModel)]="houseinfoAdd.roomCode">
        </div>
      </div>
      <div class="ui-g-6">
        <div class="ui-g-4">
          <label for="addunitCode">单元编号：</label>

        </div>
        <div class="ui-g-8">
          <input id="addunitCode" type="text" pInputText placeholder="请输入单元编号" [(ngModel)]="houseinfoAdd.unitCode">
        </div>
      </div>
      <div class="ui-g-6">
        <div class="ui-g-4">
          <label for="addroomSize">住房大小：</label>
        </div>
        <div class="ui-g-8">
          <input id="addroomSize" type="text" pInputText placeholder="请输入住房大小" [(ngModel)]="houseinfoAdd.roomSize">
        </div>
      </div>
      <div class="ui-g-6">
        <div class="ui-g-4">
          <label for="addroomType">房间类型：</label>
        </div>
        <div class="ui-g-8">
          <input id="addroomType" type="text" pInputText placeholder="请输入房间类型" [(ngModel)]="houseinfoAdd.roomType">

        </div>
      </div>
      <div class="ui-g-6">
        <div class="ui-g-4">
          <label for="addroomStatus">房间状态：</label>
        </div>
        <div class="ui-g-8">
          <input id="addroomStatus" type="text" pInputText placeholder="请输入房间状态" [(ngModel)]="houseinfoAdd.roomStatus">
        </div>
      </div>
      <div class="ui-g-6">
        <div class="ui-g-4">
          <label for="addcontractDeadline">合同房收房日期：</label>
        </div>
        <div class="ui-g-8">
          <input id="addcontractDeadline" type="text" pInputText placeholder="请输入合同房收房日期" [(ngModel)]="houseinfoAdd.contractDeadline">
        </div>
      </div>
      <div class="ui-g-6">
        <div class="ui-g-4">
          <label for="addrenovationStatus">装修情况：</label>
        </div>
        <div class="ui-g-8">
          <input id="addrenovationStatus" type="text" pInputText placeholder="请输入装修情况" [(ngModel)]="houseinfoAdd.renovationStatus">
        </div>
      </div>
    </div>
    <p-footer>
      <div class="ui-dialog-buttonpane ui-helper-clearfix">
        <button class="bf-houseinfo-dialog-Btn bf-houseinfo-dialog-Btn-sure" (click)="houseinfoAddSureClick()">确认</button>
        <button class="bf-houseinfo-dialog-Btn bf-houseinfo-dialog-Btn-false"  (click)="houseinfoAddDialog=false">取消</button>
      </div>
    </p-footer>
  </p-dialog>
  <!--修改弹窗-->
  <p-dialog header="信息修改" [(visible)]="houseinfoModifayDialog" [width]="800">
    <!--Content-->
    <div class="ui-g ui-fluid" [ngStyle]="{'line-height':'3vh'}">
      <div class="ui-g-6">
        <div class="ui-g-4">
          <label for="modifyroomCode">房间编号：</label>
        </div>
        <div class="ui-g-8">
          <input id="modifyroomCode" type="text" pInputText placeholder="请输入房间编号" [(ngModel)]="houseinfoModifay.roomCode">
        </div>
      </div>
      <div class="ui-g-6">
        <div class="ui-g-4">
          <label for="modifyunitCode">单元编号：</label>
        </div>
        <div class="ui-g-8">
          <input id="modifyunitCode" type="text" pInputText placeholder="请输入单元编号" [(ngModel)]="houseinfoModifay.unitCode">
        </div>
      </div>
      <div class="ui-g-6">
        <div class="ui-g-4">
          <label for="modifyroomSize">住房大小：</label>
        </div>
        <div class="ui-g-8">
          <input id="modifyroomSize" type="text" pInputText placeholder="请输入住房大小" [(ngModel)]="houseinfoModifay.roomSize">
        </div>
      </div>
      <div class="ui-g-6">
        <div class="ui-g-4">
          <label for="modifyroomType">房间类型：</label>
        </div>
        <div class="ui-g-8">
          <input id="modifyroomType" type="text" pInputText placeholder="请输入房间类型" [(ngModel)]="houseinfoModifay.roomType">
        </div>
      </div>
      <div class="ui-g-6">
        <div class="ui-g-4">
          <label for="modifyroomStatus">房间状态：</label>
        </div>
        <div class="ui-g-8">
          <input id="modifyroomStatus" type="text" pInputText placeholder="请输入房间状态" [(ngModel)]="houseinfoModifay.roomStatus">
        </div>
      </div>
      <div class="ui-g-6">
        <div class="ui-g-4">
          <label for="modifycontractDeadline">合同收房日：</label>
        </div>
        <div class="ui-g-8">
          <input id="modifycontractDeadline" type="text" pInputText placeholder="请输入合同收房日" [(ngModel)]="houseinfoModifay.contractDeadline">
        </div>
      </div>
      <div class="ui-g-6">
        <div class="ui-g-4">
          <label for="modifyrenovationStatus">装修情况：</label>
        </div>
        <div class="ui-g-8">
          <input id="modifyrenovationStatus" type="text" pInputText placeholder="请输入装修情况" [(ngModel)]="houseinfoModifay.renovationStatus">
        </div>
      </div>
    </div>
    <p-footer>
      <div class="ui-dialog-buttonpane ui-helper-clearfix">
        <button class="bf-houseinfo-dialog-Btn bf-houseinfo-dialog-Btn-sure" (click)="houseinfoModifySureClick()">确认</button>
        <button  class="bf-houseinfo-dialog-Btn bf-houseinfo-dialog-Btn-false"   (click)="houseinfoModifayDialog=false">取消</button>
      </div>
    </p-footer>
  </p-dialog>
  <rbi-paging [option]="option"></rbi-paging>
</div>
